DisplayCutoutCompat

constructor(@Nullable safeInsets: @Nullable Rect, @Nullable boundingRects: @Nullable List<Rect>)(source)

Creates a DisplayCutout instance.

Parameters

safeInsets

the insets from each edge which avoid the display cutout as returned by getSafeInsetTop etc.

boundingRects

the bounding rects of the display cutouts as returned by getBoundingRects ()}.


constructor(@NonNull safeInsets: @NonNull Insets, @Nullable boundLeft: @Nullable Rect, @Nullable boundTop: @Nullable Rect, @Nullable boundRight: @Nullable Rect, @Nullable boundBottom: @Nullable Rect, @NonNull waterfallInsets: @NonNull Insets)(source)

Creates a DisplayCutout instance.

Parameters

safeInsets

the insets from each edge which avoid the display cutout as returned by getSafeInsetTop etc.

boundLeft

the left bounding rect of the display cutout in pixels. If null is passed, it's treated as an empty rectangle (0,0)-(0,0).

boundTop

the top bounding rect of the display cutout in pixels. If null is passed, it's treated as an empty rectangle (0,0)-(0,0).

boundRight

the right bounding rect of the display cutout in pixels. If null is passed, it's treated as an empty rectangle (0,0)-(0,0).

boundBottom

the bottom bounding rect of the display cutout in pixels. If null is passed, it's treated as an empty rectangle (0,0)-(0,0).

waterfallInsets

the insets for the curved areas in waterfall display.


constructor(@NonNull safeInsets: @NonNull Insets, @Nullable boundLeft: @Nullable Rect, @Nullable boundTop: @Nullable Rect, @Nullable boundRight: @Nullable Rect, @Nullable boundBottom: @Nullable Rect, @NonNull waterfallInsets: @NonNull Insets, @Nullable cutoutPath: @Nullable Path)(source)

Creates a DisplayCutout instance.

Parameters

safeInsets

the insets from each edge which avoid the display cutout as returned by getSafeInsetTop etc.

boundLeft

the left bounding rect of the display cutout in pixels. If null is passed, it's treated as an empty rectangle (0,0)-(0,0).

boundTop

the top bounding rect of the display cutout in pixels. If null is passed, it's treated as an empty rectangle (0,0)-(0,0).

boundRight

the right bounding rect of the display cutout in pixels. If null is passed, it's treated as an empty rectangle (0,0)-(0,0).

boundBottom

the bottom bounding rect of the display cutout in pixels. If null is passed, it's treated as an empty rectangle (0,0)-(0,0).

waterfallInsets

the insets for the curved areas in waterfall display.

cutoutPath

the path of the display cutout. Specifying a path with this constructor is only supported on API 33 and above, even though a real DisplayCutout can have a cutout path on API 31 and above. On API 32 and below, this path is ignored.